import request from '@/utils/request'

export function listSaleSendOrderDelivery(data) {
  return request({
    url: '/api/eim/sale_send_order_delivery/page',
    method: 'post',
    data
  })
}

// export function saveSaleSendOrderDelivery(data) {
//   return request({
//     url: '/api/eim/sale_send_order_delivery/save',
//     method: 'post',
//     data
//   })
// }

/**
 * 修改发送
 * @param data
 * @returns {AxiosPromise}
 */
export function updateSaleSendOrderDeliveryForSend(data) {
  return request({
    url: '/api/eim/sale_send_order_delivery/update_send',
    method: 'post',
    data
  })
}

/**
 * 修改通知
 * @param data
 * @returns {AxiosPromise}
 */
export function updateSaleSendOrderDeliveryForNotify(data) {
  return request({
    url: '/api/eim/sale_send_order_delivery/update_notify',
    method: 'post',
    data
  })
}

/**
 * 确认签收
 * @param data
 * @returns {AxiosPromise}
 */
export function updateSaleSendOrderDeliveryForConfirm(data) {
  return request({
    url: '/api/eim/sale_send_order_delivery/update_confirm',
    method: 'post',
    data
  })
}
/**
 * 最新任务
 * @param data
 * @returns {AxiosPromise}
 */
export function listSaleSendOrderDeliveryLog(data) {
  return request({
    url: '/api/eim/sale_send_order_delivery/list_log',
    method: 'post',
    data
  })
}

// export function saveAllSaleSendOrderDelivery(data) {
//   return request({
//     url: '/api/eim/sale_send_order_delivery/save_all',
//     method: 'post',
//     data
//   })
// }

// export function listExistSaleSendOrderDelivery(data) {
//   return request({
//     url: '/api/eim/sale_send_order_delivery/list_exist',
//     method: 'post',
//     data
//   })
// }

export function listRegion(data) {
  return request({
    url: '/api/cms/sale_division/list',
    method: 'post',
    data
  })
}

export function refreshLogistics(data) {
  return request({
    url: '/api/eim/sale_send_order_delivery/refresh_logistics',
    method: 'post',
    data
  })
}

export function listPreOptions() {
  return request({
    url: '/api/eim/sale_send_order_delivery/list_pre_options',
    method: 'get'
  })
}

/**
 * 监控数据
 * @param data
 * @returns {AxiosPromise}
 */
export function getMonitorData(data) {
  return request({
    url: '/api/eim/sale_send_order_delivery/monitor',
    method: 'post',
    data
  })
}

// /**
//  * 获取最新任务
//  * @param data
//  * @returns {AxiosPromise}
//  */
// export function saleSendOrderDeliveryLogPage(data) {
//   return request({
//     url: '/api/eim/sale_send_order_delivery_log/page',
//     method: 'post',
//     data
//   })
// }
